.performance {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.example-container {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.example-container h4 {
  margin: 0 0 15px 0;
  color: #495057;
  border-bottom: 2px solid #007bff;
  padding-bottom: 8px;
}

/* 性能监控样式 */
.performance-monitor {
  background-color: #e9ecef;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.performance-monitor h4 {
  margin: 0 0 10px 0;
  color: #495057;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.metric-item {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 10px;
  text-align: center;
}

.metric-item label {
  display: block;
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 5px;
}

.metric-item span {
  display: block;
  font-size: 16px;
  font-weight: bold;
  color: #007bff;
}

/* 控件样式 */
.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.toggle-btn {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.toggle-btn.active {
  background-color: #007bff;
}

.toggle-btn:hover {
  background-color: #5a6268;
}

.toggle-btn.active:hover {
  background-color: #0056b3;
}

.render-info,
.calculation-info,
.counter-info,
.item-count {
  display: flex;
  gap: 15px;
  align-items: center;
  font-size: 14px;
  color: #6c757d;
}

/* 列表项样式 */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.list-item {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.list-item.selected {
  border-color: #007bff;
  background-color: #e3f2fd;
}

.item-avatar {
  width: 40px;
  height: 40px;
  background-color: #007bff;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.item-info {
  flex: 1;
}

.item-info h3 {
  margin: 0 0 5px 0;
  color: #343a40;
  font-size: 16px;
}

.item-info p {
  margin: 0 0 5px 0;
  color: #6c757d;
  font-size: 14px;
}

.item-category {
  display: inline-block;
  background-color: #e9ecef;
  color: #495057;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.item-stats {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat {
  font-size: 12px;
  color: #6c757d;
}

/* 过滤器样式 */
.filter-section {
  margin-bottom: 20px;
}

.filter-input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 16px;
  box-sizing: border-box;
}

.filter-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 统计卡片样式 */
.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-card {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
}

.stat-card h3 {
  margin: 0 0 5px 0;
  color: #495057;
  font-size: 14px;
}

.stat-card span {
  display: block;
  font-size: 18px;
  font-weight: bold;
  color: #007bff;
}

/* 任务列表样式 */
.tasks-section {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
}

.tasks-section h5 {
  margin: 0 0 15px 0;
  color: #495057;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.task-item:hover {
  background-color: #f8f9fa;
}

.task-item.completed {
  background-color: #e8f5e8;
}

.task-checkbox {
  font-size: 18px;
}

.task-name {
  flex: 1;
  color: #343a40;
}

.task-item.completed .task-name {
  text-decoration: line-through;
  color: #6c757d;
}

/* 虚拟滚动样式 */
.virtual-list-container {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
}

.virtual-list-viewport {
  overflow-y: auto;
  background-color: white;
}

.virtual-list-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-bottom: 1px solid #f1f3f4;
  height: 80px;
  box-sizing: border-box;
}

.virtual-list-item:last-child {
  border-bottom: none;
}

.item-index {
  background-color: #e9ecef;
  color: #495057;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

.item-content {
  flex: 1;
  min-width: 0;
}

.item-content h4 {
  margin: 0 0 5px 0;
  color: #343a40;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-content p {
  margin: 0 0 5px 0;
  color: #6c757d;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
}

.category {
  background-color: #e9ecef;
  color: #495057;
  padding: 2px 6px;
  border-radius: 12px;
}

.views,
.likes {
  color: #6c757d;
}

.regular-list {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background-color: white;
}

/* 懒加载样式 */
.lazy-content {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder {
  text-align: center;
  color: #6c757d;
  max-width: 400px;
}

.placeholder p {
  margin: 10px 0;
}

.loading-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #6c757d;
  font-size: 18px;
}

/* 标签页样式 */
.tab-navigation {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  border-bottom: 1px solid #dee2e6;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 14px;
  color: #6c757d;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.tab-btn:hover {
  color: #007bff;
}

.tab-btn.active {
  color: #007bff;
  border-bottom-color: #007bff;
}

.tab-content {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
}

/* 性能提示样式 */
.performance-tip {
  background-color: #e3f2fd;
  border: 1px solid #bbdefb;
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
}

.performance-tip p {
  margin: 0;
  color: #0d47a1;
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .render-info,
  .calculation-info,
  .counter-info,
  .item-count {
    justify-content: center;
  }
  
  .items-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-section {
    grid-template-columns: 1fr;
  }
  
  .tab-navigation {
    flex-wrap: wrap;
  }
  
  .tab-btn {
    flex: 1;
    min-width: 100px;
    text-align: center;
  }
  
  .virtual-list-item {
    padding: 10px;
  }
  
  .item-content h4 {
    font-size: 12px;
  }
  
  .item-content p {
    font-size: 11px;
  }
}